﻿using System;

namespace TI_BLE_HCI_ClientLib.DataEntities.Advertising
{
    public class FlagsAdvertisingDataStructure : AdvertisingDataStructure
    {
        [Flags]
        public enum FlagsEnum
        {
            LELimitedDiscoverableMode = 0x01,
            LEGeneralDiscoverableMode = 0x02,
            BR_EDR_NotSupported = 0x04,
            LE_and_BR_EDR_ToSameDeviceCapable_Controller = 0x08,
            LE_and_BR_EDR_ToSameDeviceCapable_Host = 0x10,
            Reserved_Bit_5 = 0x20,
            Reserved_Bit_6 = 0x40,
            Reserved_Bit_7 = 0x80
        }

        private FlagsEnum _valueBitField;

        public FlagsEnum ValueBitField
        {
            get { return _valueBitField; }
            set { _valueBitField = value; }
        }

        public FlagsAdvertisingDataStructure(FlagsEnum valueBitField)
            : base(AdvertisingDataStructureTypeEnum.Flags,new byte[] {(byte)valueBitField})
        {
            _valueBitField = valueBitField;
        }
    }
}